﻿using System;
using System.Data;
using System.Runtime.InteropServices;
using System.Web;
using System.Web.SessionState;
using System.Collections;
using System.Web.UI;
using System.Web.UI.WebControls;
using DreamBuilder.DictionaryAccess;


namespace DreamBuilder.UI.UserControls
{
    public  class DataControlFieldFactory
    {
        public static DataControlField Create(CVoucherListItemInfo voucherListItemInfo, SortData sortData)
        {
            if (voucherListItemInfo.ItemType == LISTITEMTYPE.TYPE_BoundColumn)
            {
                return new ListBoundField(voucherListItemInfo, sortData);
            }
            else
            {
                return new ListHyperLinkField(voucherListItemInfo, sortData);
            }
        }
        public static ITemplate CreateBoundLink(CVoucherListItemInfo voucherListItemInfo, string sImageUrl)
        {
            return new ListTemplateBoundLink(voucherListItemInfo, sImageUrl);
            
        }
    }
}
